473,418 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

safari select option onmouseover event

It seems, at least as far as my tests show, that Safari does not fire onmouseover for select options.

with the code below, I can get all the messages in Firefox, but none in Safari.
If I attach a handler for the onmouseover to the select element (the part currently commented out) I can get the first mouseover of the select element, but not any additional ones. Again, in Firefox, I get all the messages, although they are handled by the selectorMouse function.

Is this familiar to anyone, and are there any work-arounds?

thanks in advance,
Linus

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.         <title>Woohoo</title>
  4.         <script language="javascript" type="text/javascript">
  5.             function selectorMouse(evt, selector) {
  6.                 document.getElementById("msg").innerHTML="selector:"+evt.target.value;
  7.             }
  8.             function optionMouse(evt, option) {
  9.                 document.getElementById("msg").innerHTML="option:"+evt.target.value;
  10.             }
  11.         </script>
  12.     </head>
  13.     <body>
  14.         <div id="msg">&nbsp;</div>
  15.         <select id='selector' name='selector' > <!-- onmouseover="selectorMouse(event, this)" -->
  16.             <option id="option1" name="option1" value="op1v" onmouseover="optionMouse(event, this)">Option 1</option>
  17.             <option id="option2" name="option2" value="op2v" onmouseover="optionMouse(event, this)">Option 2</option>
  18.             <option id="option3" name="option3" value="op3v" onmouseover="optionMouse(event, this)">Option 3</option>
  19.         </select>
  20.     </body>
  21. </html>
Mar 23 '09 #1
3 4443
acoder
16,027 Expert Mod 8TB
I don't think this works in IE either. Either create your own DHTML select object (simply not worth the effort) or just get the selected element and forget the option element mouse-over.
Mar 28 '09 #2
yes, I had managed to fool myself regarding IE. I ended up using a CSS-based drop-down menu approach, as I needed to have the hover over the sub-items notice.

thanks for the reply.
Mar 31 '09 #3
acoder
16,027 Expert Mod 8TB
Since you needed it, that's the most reliable, cross-browser solution. Glad you got a working solution.
Apr 1 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch...
3
by: Roger Withnell | last post by:
My simple popup menu code works in IE (Windows and Mac) but not in Safari. I use a onmouseover ShowMenu function and a onmouseout HideMenu function. Because Safari, unlike IE, recognises...
4
by: Marek Mänd | last post by:
This seems an IE issue only: 4253 bytes testcase: http://www.hot.ee/idaliiga/testcases/ieselect/bnlinkingselectinmsie.htm Can one have 1) a mouseover/mouseout element on TBODY 2) change in...
2
by: Ilpo | last post by:
Hi! Is it possible to open DHTML menu from a select box option? I need a select box which shows a new sub-menu when pointing the mouse over an option. Does anyone know is this possible? The...
2
by: jascraig | last post by:
Here's my dilemma. I'm working with a frameset with 3 frames (header,content,control). My control frame contains a select list with buttons for next and previous. When the next button is pushed...
1
by: mike.thirlwell | last post by:
Hi there, I've created the following demo to illustrate a problem I've been having with Safari (2.0.3 in my case) firing onmouseout events when the onmouseover event should be being triggered....
2
by: cbjewelz | last post by:
Hey all. So I'm having problems with cross browser alignments. I'm looking at Safari and Mozilla Firefox. I develop in Safari and so it looks perfect there however in Firefox my vertical...
7
by: prash.marne | last post by:
Hello, I have a simple form <form method="POST"> <select name="activity"> <option value="0">None</option> <option value="M" onclick="popup_onclick()">Select Multiple</option> <option...
5
by: jeddiki | last post by:
I want to change the default background color of my select box. Here is the problem: Link to form with color select Notice in the color selector, the background color that I have given it it...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.